.content-block {
    margin-bottom: 15px;
    display: block;
    width: 100%;
    padding: 10px;
    background: #fff;
    border-radius: $border-radius-xl;
    box-shadow: $shadow-md;

    @include media-breakpoint-down(md)  {
        display: block !important;
    }

    @include media-breakpoint-up(xl) {
        padding: 15px;
        margin-bottom: 30px;
    }

    .title {
        position: relative;

        @include media-breakpoint-up(lg) {
            padding: 0.7rem;

            &::after {
                content: '';
                position: absolute;
                bottom: 0;
                left: -15px;
                width: calc(100% + 30px);
                height: 1px;
                background-color: rgba($border-color, 0.5);
            }
        }

        &.open {
            .block-title,
            .block-subtitle {
                @include media-breakpoint-up(md)  {
                    border-color: $primary;
                    padding-bottom: 15px;
                }
            }

            .toggle-contents i {
                transform: rotate(90deg);
            }
        }

        .block-title,
        .block-subtitle {
            padding-bottom: 8px;
            margin-bottom: 0px;
            margin-top: 0;
            padding-right: 40px;
            font-weight: normal;
            transition: all 0.2s;

            @include media-breakpoint-down(md)  {
                border-color: #fff;
                padding-bottom: 0;
            }

            @include media-breakpoint-up(lg) {
                padding-right: 0;
            }

            i {
                padding: 0.4rem;
                font-size: 0.9rem;
                border-radius: 20px;
                margin-right: 0.5rem;
                width: 32px;
                height: 32px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }

        .block-title i,
        h2.block-subtitle i {
            background-color: rgba($success, 0.2);
            color: $success;
        }

        .toggle-contents {
            position: absolute;
            right: 0;
            top: 0;
            left: 0;
            bottom: 0;
            text-align: right;

            @include media-breakpoint-up(lg) {
                display: none;
            }

            i {
                padding: 7px;
                font-size: 1.4rem;
                transition: all 0.2s;
            }
        }
    }

    .content-wrap {
        @include media-breakpoint-up(lg) {
            display: block;
            visibility: visible;
        }

        .content {
            margin-top: 15px;
        }
    }

    .tab-content {
        margin-top: 10px;
    }

    .language-tabs {
        margin-top: 0px;

        .col-sm-8 {
             @include media-breakpoint-up(lg) {
                padding-left: 8px;
            }

            @include media-breakpoint-up(md) {
                padding-left: 5px;
            }
        }
    }

    .contact-addresses {
        .billing-address,
        .shipping-address {
            margin-bottom: 50px;

            h4.underline {
                margin-top: 0;
                border-bottom: 1px solid $border-color;
                margin-bottom: 30px;
                padding-bottom: 10px;

                i {
                    margin-right: 5px;
                }
            }
        }
    }

    .subtitle {
        margin-bottom: 20px;
        margin-top: 30px;

        &.top-line {
            &::before {
                content: '';
                width: calc(100% + 30px);
                height: 5px;
                position: absolute;
                left: -15px;
                top: -15px;
                background-color: rgba($border-color, 0.4);
            }
        }

        &.bottom-line {
            &::after {
                display: none;
            }
        }
    }

    h4.block-subtitle {
        i {
            background-color: rgba($warning, 0.2);
            color: $warning;
        }
    }

    hr {
        border-color: $border-color;
        margin: 30px 0px;
    }

    .text-muted {
        color: #999;
    }

    .dl-horizontal {
        dd {
            margin-bottom: 5px;
        }

        @include media-breakpoint-up(md) {
            dd { margin-left: 220px; }
            dt {
                width: 200px;
                float: left;
            }
        }
    }

    &.collapsed {
        .title {
            &.open {
                .block-title, .block-subtitle {
                    border-color: $primary;
                    padding-bottom: 15px;
                }
            }

            .block-title, .block-subtitle {
                border-color: #fff;
                padding-bottom: 0;
            }
        }

        .toggle-contents {
            display: block;
        }

        .collapse {
            display: none;

            &.show {
                display: block;
            }
        }

        .collapse.in {
            display: block;
        }
    }

    .form-content .form-control,
    .summernote-wrap,
    .select2-container,
    .checkbox {
        max-width: 80%;
        border-radius: $border-radius-lg;
        margin: 3px;
        display: inline-block;
    }

    .select2-container {
        min-width: 200px;

        // make room to add quick add buttons
        @include media-breakpoint-down(sm) {
            &.has-quick-btn::after {
                content: "";
                height: 45px;
                display: block;
            }
        }
    }
}

.modal-body .content-block {
    padding: 5px;
    margin-bottom: 10px;

    .content-wrap {
        .content {
            margin-top: 15px;
        }
    }
}

.note-editor.note-frame {
    border-color: $border-color;
    box-shadow: $shadow-md;
    border-radius: $border-radius-lg;
}

.note-editor .modal .modal-dialog {
    z-index: 1050;
}

.note-toolbar {
    background-color: rgba($border-color, 0.12);
    border-bottom: 1px solid $border-color;
}

.content-block-card {
    border: 1px solid $border-color;
    border-radius: $border-radius-lg;
    padding: 0.6rem 0.5rem;
    margin-bottom: 1rem;

    h5 {
        color: rgba($text-color, 0.7);
    }

    span.amount {
        font-size: 1.6rem;
    }
}

.stock-management-form {

    .form-content {
        padding: 0.8rem 0;
        padding-top: 0;
    }

}

.text-between-fields {
    background-color: $gray-bg;
}

.list-group-item {
    border-color: $border-color;
}

.table th {
    border-top: none;
    font-size: 1rem;
}

.table td {
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(darken($gray-bg, 10%), 0.3);
}

.theme-card {
    border-radius: $border-radius-xl;
}

.card-img-top {
    border-radius: $border-radius-xl;
}

.theme-card-body {
    background-color: $white;
    width: 90%;
    margin: 0 auto;
    z-index: 900;
    position: relative;
    top: -2rem;
    border-radius: $border-radius-lg;
    box-shadow: $shadow-md;

    .btn {
        margin: 5px;
    }
}

.active-theme {
    &::before {
        content: '\f00c';
        font-family: 'FontAwesome';
        width: 32px;
        height: 32px;
        color: $white;
        border-radius: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: $success;
        position: absolute;
        top: -12px;
        right: 0;
    }
}

.btn-configure-theme {
    position: absolute;
    top: 0;
    right: 0;
    margin: 1.5rem 2rem;
}

.create-payment {
    background-color: $gray-bg;
}

.create-payment-total {
    h5 {
        opacity: 0.8;
        font-weight: normal;
    }
}
